import 'main_db.dart';

class DbHelp {
  static final DbHelp? _dbHelp;

  late FloorFlutterDatabase _database;

  DbHelp._() {
    initDB();
  }

  void initDB() async {
    _database = await $FloorFloorFlutterDatabase
        .databaseBuilder('flutter_database.db')
        .build();
  }

  static FloorFlutterDatabase getInstance() {
    _dbHelp ?? DbHelp._();
    return _dbHelp!._database;
  }
}
